Golang - 型別宣告



string

var test1 string = "123"

int

var test1 int = 1

float64

var test1 float64 = 1.1

bool

var test1 bool = true

短變數宣告

test1 := 100
test2, test3 := 1.1, "123"
#golang #GO







你可能感興趣的文章

component test 問題集2(Vue2 + TS + Jest+ vue-test-utils)

component test 問題集2(Vue2 + TS + Jest+ vue-test-utils)

【SSH 技巧】使用 iTerm2 設定 Profile + Shell Script 自動登入 Server

【SSH 技巧】使用 iTerm2 設定 Profile + Shell Script 自動登入 Server

[第九週] 資料庫系統簡介

[第九週] 資料庫系統簡介






留言討論